<!DOCTYPE HTML>
<html lang="zh-hans" >
    <!-- Start book Linux -->
<!-- Start book Linux -->
    <head>
        <!-- head:start -->
<!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>权限管理 | Linux</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="chris Jiang">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-prism/prism.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./chapter10.html" />
    
    
    <link rel="prev" href="./chapter08.html" />
    

        <!-- head:end -->
<!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
<!-- body:start -->
        
    <div class="book"
        data-level="9"
        data-chapter-title="权限管理"
        data-filepath="chapter09.md"
        data-basepath="."
        data-revision="Mon Sep 30 2019 00:13:13 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        学习目标
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="chapter01.html">
            
                
                    <a href="./chapter01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Linux入门
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="01/section01.html">
            
                
                    <a href="./01/section01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        操作系统介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="01/section02.html">
            
                
                    <a href="./01/section02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        Linux系统介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="01/section03.html">
            
                
                    <a href="./01/section03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        使用虚拟机安装Ubuntu
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="01/section04.html">
            
                
                    <a href="./01/section04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        使用U盘安装双系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="01/section05.html">
            
                
                    <a href="./01/section05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        配置Linux系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="01/section06.html">
            
                
                    <a href="./01/section06.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        Linux启动流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="01/section07.html">
            
                
                    <a href="./01/section07.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        远程连接Linux
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="chapter02.html">
            
                
                    <a href="./chapter02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        软件安装相关指令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="chapter03.html">
            
                
                    <a href="./chapter03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        文件系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="chapter04.html">
            
                
                    <a href="./chapter04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        vim编辑器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="chapter05.html">
            
                
                    <a href="./chapter05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        目录操作的常见指令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="chapter06.html">
            
                
                    <a href="./chapter06.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        python、pip和ipython的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="chapter07.html">
            
                
                    <a href="./chapter07.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        虚拟环境管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="chapter08.html">
            
                
                    <a href="./chapter08.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        用户管理相关指令
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="9" data-path="chapter09.html">
            
                
                    <a href="./chapter09.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        权限管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10" data-path="chapter10.html">
            
                
                    <a href="./chapter10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        压缩解压命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11" data-path="chapter11.html">
            
                
                    <a href="./chapter11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.</b>
                        
                        服务监听
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12" data-path="chapter12.html">
            
                
                    <a href="./chapter12.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.</b>
                        
                        管道和重定向
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="13" data-path="chapter13.html">
            
                
                    <a href="./chapter13.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.</b>
                        
                        Nginx的安装和配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="14" data-path="chapter14.html">
            
                
                    <a href="./chapter14.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.</b>
                        
                        Git的使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="14.1" data-path="14/section01.html">
            
                
                    <a href="./14/section01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.1.</b>
                        
                        git本地和远端管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="14.2" data-path="14/section02.html">
            
                
                    <a href="./14/section02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.2.</b>
                        
                        冲突的介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="14.3" data-path="14/section03.html">
            
                
                    <a href="./14/section03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.3.</b>
                        
                        分支操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="14.4" data-path="14/section04.html">
            
                
                    <a href="./14/section04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.4.</b>
                        
                        远端服务器的SSH连接
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="15" data-path="chapter15.html">
            
                
                    <a href="./chapter15.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>15.</b>
                        
                        shell编程
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    本书使用 GitBook 发布
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >Linux</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x6743;&#x9650;&#x7BA1;&#x7406;">&#x6743;&#x9650;&#x7BA1;&#x7406;</h1>
<ul>
<li><p>&#x8BF4;&#x660E;&#xFF1A;&#x5728;linux&#x4E0B;&#xFF0C;&#x6240;&#x6709;&#x7684;&#x6587;&#x4EF6;&#x90FD;&#x6D89;&#x53CA;&#x6743;&#x9650;&#xFF0C;&#x5206;&#x4E3A;&#x4E09;&#x7EC4;&#xFF1A;&#x6240;&#x6709;&#x8005;&#x3001;&#x6240;&#x5C5E;&#x7EC4;&#x3001;&#x5176;&#x4ED6;</p>
</li>
<li><p>&#x6743;&#x9650;&#xFF1A;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x7684;&#x6743;&#x9650;&#x53EF;&#x4EE5;&#x5206;&#x4E3A;&#xFF1A;&#x53EF;&#x8BFB;(r)&#x3001;&#x53EF;&#x5199;(w)&#x3001;&#x53EF;&#x6267;&#x884C;(x)&#xFF0C;&apos;-&apos;&#x8868;&#x793A;&#x6CA1;&#x6709;&#x6539;&#x6743;&#x9650;</p>
</li>
<li><p>&#x539F;&#x7406;&#xFF1A;ls -l&#x7684;&#x7ED3;&#x679C;&#xFF0C;&#x4E09;&#x4F4D;&#x4E00;&#x7EC4;&#xFF0C;&#x5206;&#x4E3A;&#x4E09;&#x7EC4;&#xFF0C;&#x521A;&#x597D;&#x5BF9;&#x5E94;&#xFF1A;&#x6240;&#x6709;&#x8005;&#x3001;&#x6240;&#x5C5E;&#x7EC4;&#x3001;&#x5176;&#x4ED6;</p>
</li>
<li><p>&#x4FEE;&#x6539;&#x6743;&#x9650;&#xFF1A;chmod&#xFF0C;&#x683C;&#x5F0F;&#xFF1A;<code>chmod [&#x8EAB;&#x4EFD;] [&#x64CD;&#x4F5C;] [&#x6743;&#x9650;] &#x6587;&#x4EF6;</code></p>
</li>
</ul>
<table>
<thead>
<tr>
<th>&#x9009;&#x9879;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x8EAB;&#x4EFD;</td>
<td></td>
</tr>
<tr>
<td>u</td>
<td>&#x6240;&#x6709;&#x8005;(user)</td>
</tr>
<tr>
<td>g</td>
<td>&#x6240;&#x5C5E;&#x7EC4;(group)</td>
</tr>
<tr>
<td>o</td>
<td>&#x5176;&#x4ED6;(other)</td>
</tr>
<tr>
<td>a</td>
<td>&#x6240;&#x6709;&#xFF08;all&#xFF09;</td>
</tr>
<tr>
<td>&#x64CD;&#x4F5C;</td>
<td></td>
</tr>
<tr>
<td>+</td>
<td>&#x6DFB;&#x52A0;</td>
</tr>
<tr>
<td>-</td>
<td>&#x53BB;&#x6389;</td>
</tr>
<tr>
<td>=</td>
<td>&#x8BBE;&#x7F6E;</td>
</tr>
<tr>
<td>&#x6743;&#x9650;</td>
<td></td>
</tr>
<tr>
<td>r</td>
<td>&#x53EF;&#x8BFB;</td>
</tr>
<tr>
<td>w</td>
<td>&#x53EF;&#x5199;</td>
</tr>
<tr>
<td>x</td>
<td>&#x53EF;&#x6267;&#x884C;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>sudo chmod o+w 1.py&#xFF0C;&#x7ED9;&#x5176;&#x4ED6;&#x7528;&#x6237;&#x6DFB;&#x52A0;&#x53EF;&#x5199;&#x7684;&#x6743;&#x9650;</p>
</blockquote>
<ul>
<li><p>&#x672C;&#x8D28;&#xFF1A;&#x4F7F;&#x7528;&#x4E00;&#x7EC4;(3&#x4F4D;)&#x516B;&#x8FDB;&#x5236;&#x7684;&#x6570;&#x636E;&#x6765;&#x8868;&#x793A;&#x6743;&#x9650;&#xFF0C;&#x5982;&#xFF1A;0755&#xFF0C;&#x5C55;&#x5F00;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code>&#x8F6C;&#x6362;&#x4E3A;&#x4E8C;&#x8FDB;&#x5236;&#xFF1A;0755 =&gt; 111 101 101
&#x5BF9;&#x5E94;&#x4E09;&#x7EC4;&#x8EAB;&#x4EFD;&#xFF1A;     &#x6240;&#x6709;&#x8005; &#x6240;&#x5C5E;&#x7EC4; &#x5176;&#x4ED6;
&#x6BCF;&#x4E00;&#x7EC4;&#x7684;&#x6743;&#x9650;&#xFF1A;&#x90FD;&#x5305;&#x62EC; &#x53EF;&#x8BFB;&#x3001;&#x53EF;&#x5199;&#x3001;&#x53EF;&#x6267;&#x884C;
&#x793A;&#x4F8B;&#x89E3;&#x6790;&#xFF1A;&#x6240;&#x6709;&#x8005;&#x53EF;&#x8BFB;&#x53EF;&#x5199;&#x53EF;&#x6267;&#x884C;&#xFF0C;&#x6240;&#x5C5E;&#x7EC4;&#x53EF;&#x8BFB;&#x53EF;&#x6267;&#x884C;&#xFF0C;&#x5176;&#x4ED6;&#x53EF;&#x8BFB;&#x53EF;&#x6267;&#x884C;
</code></pre></li>
<li><p>&#x7B80;&#x5316;&#x64CD;&#x4F5C;&#xFF1A;sudo chmod 0755 1.py</p>
<blockquote>
<p>&#x82E5;&#x8981;&#x8FDB;&#x884C;&#x9012;&#x5F52;&#x64CD;&#x4F5C;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x6DFB;&#x52A0;&apos;-R&apos;&#x64CD;&#x4F5C;</p>
</blockquote>
</li>
<li><p>umask</p>
<pre><code>&#x4F5C;&#x7528;&#xFF1A;&#x7528;&#x6765;&#x9650;&#x5B9A;&#x65B0;&#x5EFA;&#x6587;&#x4EF6;&#x7684;&#x9ED8;&#x8BA4;&#x6743;&#x9650;&#xFF0C;&#x6743;&#x9650;&#x4E0E;&#x8BE5;&#x503C;&#x76F8;&#x53CD;&#x3002;
&#x547D;&#x4EE4;&#xFF1A;umask [value]&#xFF0C;&#x67E5;&#x770B;&#x6216;&#x8BBE;&#x7F6E;&#x63A9;&#x7801;
&#x5206;&#x6790;&#xFF1A;
    &#x63A9;&#x7801;&#xFF1A;0002 =&gt; 000 000 010
    &#x65B0;&#x5EFA;&#x76EE;&#x5F55;&#xFF1A;     111 111 101
    &#x65B0;&#x5EFA;&#x6587;&#x4EF6;&#xFF1A;     110 110 100
</code></pre></li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./chapter08.html" class="navigation navigation-prev " aria-label="Previous page: 用户管理相关指令"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./chapter10.html" class="navigation navigation-next " aria-label="Next page: 压缩解压命令"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-copy-code-button/toggle.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"prism":{},"splitter":{},"copy-code-button":{},"toggle-chapters":{},"highlight":{},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
<!-- body:end -->
    </body>
    <!-- End of book Linux -->
<!-- End of book Linux -->
</html>
